package org.dxy.domain.event.workstation;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Value;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * @description:  事件：工位创建
 * <p>表示一个新的工位在系统中注册成功</p>
 * @author: dxy
 * @createTime: 2025/6/18 22:34
 */
@Value
@Builder
@AllArgsConstructor
public class WorkstationCreatedEvent implements DomainEvent {
    Long workstationId;
    Long processRouteId;
    
    @Override
    public Long aggregateId() {
        return workstationId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.WORKSTATION.getKey();
    }
    
    @Override
    public String eventType() {
        return WorkstationEventTypeEnum.CREATED.getKey();
    }
}